Note: These text files were written with SimpleText, which allows multiple fonts and styles. This makes it easier to read. If you are not seeing the headings of this text in boldface, quit and then open it with SimpleText. You may want remove TeachText from your hard drive and replace it with SimpleText.
About World Builder
World Builder was first released in 1986. Publication was discontinued a few years later, and for several years the program was out of print and unavaible. On August 7, 1995 Bill Appleton, the creater of World Builder, released it to the public domain. The version that I have posted with these files has been converted by me to be 32-bit compatible. This means it will run on any Mac, and so will the games you create with it. However, due to changes in the sound handling hardware, the sounds do not work on most AV Macs or PowerMacs.
This file should include the World Builder application, the World Template, Sound Converter, Ray'd World Template, and a sample sound library. I've also written a few text files to help you use WB to it's fullest. If you distribute these files, please keep them together.
Originally, the way to make a game is by first making a duplicate of the World Template. However, I've created a new Template, which has re-sized text windows, some special Global code, and a couple useful objects. Both templates are included in this file for your convenience; but I think you'll find my template to be more helpful.
To get started making a game using World Builder, first make a duplicate of Ray's World Template. Change the name of the duplicate to the whatever you want to call your game. Then open it with World Builder.
One blank scene has already been created. The scene and text windows of this scene have been changed to a size and position that is larger and better looking than the standard. Do NOT use the "Create" button to make more scene! Instead, copy this blank scene and paste in as many copies of it as you need.
Draw a picture of the scene in the Scene window, using the built-in crawing tools. In most cases, the description of the scene can be written into the scene Text window. However, in some cases it is better to make the scene description a part of the scene code. For instance, when there is something in the the scene that changes, and requires the scene description to change during the course of the game. In other cases, you may need both -- a description written in the Text window, and scene code that overrides it under special circumstances.
Use the Scene Data to block travel in any north, south, east or west. When a direction is blocked, that side of the Scene rectangle will have a thick line. Travel across a blocked direction, or up/down, can be accomplished using scene code. For instance:
IF{TEXT$=UP}THEN
MOVE{PLAYER@}TO{UPPER ROOM}
EXIT
CHARACTERS
A Player Character has already been created too. You must change the name of the character to fit your game. No drawing is needed for the Player Character, since it will never be seen during the game. Examine the Character Data carefully. Notice that there are buttons you can click to tell the game whether or not the character is the player character, whether it's a "he", "she" or "it," and whether or not the name is a proper noun.
Be sure to enter the name of the first scene in the player character's data. This is will make the game start at that scene. Non-player characters (NPC's) can be kept in STORAGE@ until called into the game by code, or you can enter the name of a scene into their Data and they will first appear in that scene.
The rest of the data determines things like the character's strength, speed, etc. You may wish to change these.
All other Characters that you create using the Character menu will be considered opponents of the player. Anytime the player encounters them, they may attack, run away, or try to offer something to the player. The ony control you will have over these non-player characters is by making adjustments in their Data. This is very limited! For this reason, I strongly recommend that you use "real" Characters only for minor creatures, such as bats, rats, etc., and keep the damage they can inflict very low. For a true adventure game, it is much better to use Objects to represent most NPC's, and handle all of the necessary interaction with code. More on this later...
OBJECTS
Objects can be mobile or immobile. Immobile objects allow you to make clickable objects, simple animation, etc. They can only be moved according to the scene or global code. Mobile objects are things that the player can pick up by just clicking on them, and are automatically included in the player's inventory. You can specify in the Object data what kind of object it is, what scene it appears in, or what character carrys it. You can specify the number of uses, the sound it makes, what damage it does if it is a weapon, and what happens to it when it is "used up." Many of these things can also be handled with scene or global code.
CODE
Almost all the action in a game is handled with code. There are two kinds o fcode used in World Builder games: Scene Code and Global Code. Scene code is where most of the code in a game will be. It handles only the actions within that scene. However, you can use scene code to set or change variables that will carry over into the rest of the game.
Global code is for things that can happen anywhere in the game, and for "default" responses to standard player commands. For instance, "Search" is a common command. The player should search every scene. In most scenes there will probably be nothing special to find, and the standard response would be written into code like this:
IF{TEXT$=SEARCH}THEN
PRINT{You find nothing of interest.}
EXIT
However, it would waste time and space to put this in every scene, so you'd put it in the global code instead. Anytime that the player DOES find something during a search, would be put into the scene code.
Inportant: "Ray's World Template" contains some custom global code to help you get started on your game. Some of it you may not need. To find out more about this, read the "Global Code Info" text file.
Unfortunately, there is a strict limit of 10,240 characters of text in each scene code and in the global code. That may seem like a lot, but it isn't! I run up against that limit all the time in my complex adventures. So be very careful about what you put into the Global code. In some cases, I've taken things that might have gone into the global code, and put it into scene code instead, just to save space. For instance, if there is a specific object that the player needs to solve a puzzle in one area, I find some logical way of limiting the player's ability to carry it outside that area, and then put the code for the object only in those scenes.
Included with this file are several texts that explain more about using World Builder and writing code. Study them carefully!
You can open other World Builder games with World Builder, and examine their code to see how it is done. I strongly recommend that you study the code in "A Mess O'Trouble" since it has the cleanest, most advanced code available at this time. "Ray's World Builder Demo" is also good. It is a short simple game designed to demonstrate basic WB programming techniques, plus detailed explanations of all the scene and global code. Be sure to read the files titled Syntax Tutorial and Variables Tutorial.
How to write
There is more to creating a quality adventure game than just knowing how to write the code. You have to be able to tell a story, and incorporate interesting puzzles into the story. If you do a game that is nothing but fighting monsters, it will NOT be any good. Simply making a bunch of creatures in the Character menu and having the player fight them, is not the way to make an adventure game. If that's the kind of game you really want to make, find another program.
You can't use World Builder to make "DOOM 3!" The limitations of the program make it inappropriate for games like Doom, or even most RPG's. Running through a corridor blasting everything that moves is great in a fully animated environment like Doom. But the same thing in a World Builder game translates to: Move from one scene to another, encountering static drawings of creatures, and pulling down the Weapons menu to select "Fire pistol" over and over, until the creature is removed from the scene, unless it kills you first, and it usually will. Obviously this is no fun at all!
A good WB game MUST have a good story, good puzzles, and a minimum of dying. Even if you have monsters or other enemies in your game, you should make it a puzzle to defeat them. In other words, the player should have to use his head, not just use the Weapons menu over and over. That gets real old, real fast.
To help you, I've included a some files that deal with the creative process of designing and writing adventure games.
For more info on WB programming and adventure game creation, check out my columns in The Shareware Review.
MONSTER@ (The non-player character currently in the scene, if any)
RANDOMCHR@ (A randomly selected character) <this is pretty useless
RANDOMOBJ@ (A randomly selected object) <this is pretty useless too
RANDOMSCN@ (A randomly selected scene) <You can move a player to a random scene this way.
STORAGE@ (A sort of invisible room where objects and characters are stored when not in use. To make the player die, or end the game, move the player to STORAGE@)
Everytime the player enters a command or mouse click, the program goes through the scene code to see if something must be done. When it encounters a conditional statement that is true, it does whatever is required in that part of the code. Each statement must be followed with either EXIT or END. The word EXIT stops the program right there. The word END means that this particular statement is finished, but allows the program to continue through the rest of the scene code to see if anything else has to be done. After going through the scene code, if it hasn't been stopped by an EXIT, then the program continues on to the Global code, where it checks for any other conditions that must be acted on.
You can use EXIT or END wherever needed, such as this example:
IF{TEXT$=UP}OR{TEXT$=CLIMB}THEN
IF{SECRET.LADDER=SCENE@}THEN
MOVE{PLAYER@}TO{HIDEOUT}
EXIT
END
In this case, if the secret ladder hasn't been found when the player tries to go up, then the program passes this statement and goes to the global code. In the global code you'd have a standard response:
Please note that you can use AND or OR to connect conditions in a statement. But you can't use both AND and OR in the same statement. For example, you can do this:
IF{TEXT$=SHOOT}AND{PISTOL=PLAYER@}THEN
IF{THING.1=SCENE@}OR{THING.2=SCENE@}THEN
SOUND{GUNSHOT}
PRINT{Your bullets bounce off the creature without harming it!}
In the several of the examples above, you can see how to display text in the text window. Playing sounds or moving characters or objects is handled similarly:
SOUND{BOOM.1} ("BOOM.1" is just an example. You can enter the name of whatever
There are 234 User Variables. These are numbers that the programmer can use to keep track of events, etc. They are A1# through A9#, B1# through B9#, etc, continuing through the alphabet. Keep track of which variables you use in your game! If you accidently use the same variable for two different things, it will cause things to go wrong in your game, and it can be a real pain to try to track down this kind of problem. I've included a list of all User Variables that you can print out, to help you keep track of them. Just make a note next to each variable that you use, telling what it was used for, or which scene it was used in.
Also, variable B4# is bad. This is a bug in the program. Don't use it!
At the beginning of a game, all User Variables are at less than one, NOT zero. So if you want to know whether the player has taken a certain action, write your code like this:
LET{A1#=A1#+1} (This is a counter. You can use this as part of a statement, so that it adds up every time the player does a certain action. Or use it by itself, and it will add a point everytime the player makes any actions in a scene.)
LET{A1#=A1#-1} (Same as above, except it is counting down instead of up.)
LET{A1#=H4#} (You can pass the amount of one variable to another variable.)
LET{A1#=B1#+B2#} (You can set one variable to the sum of two other variables.)
LET{A1#=RANDOM#} (You can set a variable to a random number between 1 and 100.)
Be sure to read the Syntax Tutorial and Variables Tutorial for more detailed explanations of these subjects!